". `env` . `/bin/pwd`."\n"; if (!$ENV{"PATH_TRANSLATED"}) { print "Content-type: text/html\n\n"; &ServerError; } $file = $ENV{"PATH_TRANSLATED"}; if (-d $file && !($file =~ /\/$/)) { # If it points to a directory without a # '/' after it, relative links will be broken, # send a redirect to the client to make # the client look in the right place. print "Location: http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}$ENV{SCRIPT_NAME}$ENV{PATH_INFO}/\n\n"; exit; } $ENV{"DOCUMENT_URI"} = $ENV{"PATH_INFO"}; if (-d $file) { $file .= $DirectoryIndex; $ENV{"DOCUMENT_URI"} .= $DirectoryIndex; } if (!($file =~ m!^.*\.html?!)) # is it an html (or htm)? { # it's not, so we can't parse it print "Location: $ENV{PATH_INFO}\n\n"; # have the server send it out raw exit; } print "Content-type: text/html\n\n"; open(HTML,$file) || &ServerError; $/ = ">"; # set paragraph separator #@tags = split("<",$entire); #foreach $line (@tags) while ($line = ) { $/ = "\n"; # gotta put it back the way it was # Look through the file looking for a server-side include... if ($line =~ //) { $file = $1; print $`; $end = $'; # Pick the right ScriptAlias from the list. foreach $a (keys %ScriptAlias) { last if $file =~ s!^$a!$ScriptAlias{$a}!; } undef $path_info; # Find the actual program and the residual PATH_INFO while ((!-f $file || !-x $file) && length($file)) { $pos = rindex($file, "/"); $path_info = substr($file, $pos) . $path_info; $file = substr($file, 0, $pos); } ($dir, $prog) = ($file =~ m!^(.*)/(.*)$!); chdir $dir; if (defined $path_info) { $ENV{"PATH_INFO"} = $path_info; ($uid, $path) = ($path_info =~ m!/~([^/])(.*)!); if ($uid) { $path_tran = (getpwnam($uid))[7] . $path_info . "/" . $UserDir; } else { $path_tran = $DocumentRoot . $path_info; } } # Make sure that the program that we are about to call is in fact # an executable program... If it isn't, spit out something to # that effect. if (! -e $prog) { print "[ssis: program not found. " . "More info availible]"; } elsif (! -x $prog) { print "[ssis: non executable program specified: '$dir' / '$prog'" . " " . "More info availible]"; } else { # We have a program that exists and that we can run. Run it! open (INCLUDE, "./$prog|"); $gotblank = 0; while ($rline =
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
$message EOM exit(1); }